<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>视频播放</title>
  <style>
    body{
      margin: 0;
      padding:0;
    }
    #video{
      width: 100vw;
    }
  </style>
  <script src="./js/axios.js"></script>
</head>
<body>
  <video id="video" src="" controls autoplay="true">

    您的浏览器不支持 video 标签。
  </video>
</body>
<script>
  window.onload=()=>{
    let video=document.getElementById("video")
    let parmas=window.location.href.split("?")[1].split("&")
    let queryId=parmas[0].split("=")[1]
    axios.get(`/musicApi/mv/url?id=${queryId}&r=480`).then(res=>{
      if(res.status==200){
        let url=res.data.data.url
        video.src=url
        video.play()
      }
    })
  }
</script>
</html>